home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / bin / perform_recipe < prev    next >
Text File  |  2008-09-09  |  867b  |  57 lines

  1. #!/bin/sh
  2.  
  3. . /lib/partman/lib/base.sh
  4. . /lib/partman/lib/recipes.sh
  5. . /lib/partman/lib/auto-shared.sh
  6.  
  7. dev=$1
  8. free_space=$2
  9. recipe=$3
  10.  
  11. # Let us be safe and update the directories
  12. update_all
  13.  
  14. cd $dev
  15. open_dialog PARTITION_INFO $free_space
  16. read_line x1 x2 free_size free_type x3 x4 x5
  17. close_dialog
  18.  
  19. free_size=$(expr 0000000"$free_size" : '0*\(..*\)......$') # convert to megabytes
  20.  
  21. if [ "$free_type" = unusable ]; then
  22.     db_input critical partman-auto/unusable_space || true
  23.     db_go || true
  24.     exit 1
  25. fi
  26.  
  27. db_progress START 0 5 partman-auto/text/automatically_partition
  28. db_progress INFO partman-auto/progress/info
  29.  
  30. decode_recipe $recipe default
  31.  
  32. db_progress STEP 1
  33.  
  34. expand_scheme
  35.  
  36. ensure_primary
  37.  
  38. db_progress STEP 1
  39.  
  40. clean_method
  41.  
  42. db_progress STEP 1
  43.  
  44. create_primary_partitions
  45.  
  46. db_progress STEP 1
  47.  
  48. create_partitions
  49.  
  50. db_progress STEP 1
  51.  
  52. update_all
  53.  
  54. db_progress STOP
  55.  
  56. exit 0
  57.